package importExport;

import java.io.File;
import java.util.Vector;

public class FileLoader {
	public static Vector<File> loadFiles(String folderPath, String ending) {
		Vector<File> files = new Vector<File>();
		File folder = new File(folderPath);
		String endingSmall = ending.toLowerCase();
		File[] listOfFiles = folder.listFiles();
		for (File file : listOfFiles) {
			if (file.isFile()
					&& file.getAbsolutePath().toLowerCase()
							.endsWith(endingSmall)) {
				files.add(file);
			}
		}
		return files;
	}
}
